package com.sls.web.manager.action.recharge;

import javax.annotation.Resource;

import com.sls.web.manager.action.SuperAction;
import com.sls.web.manager.common.Constants;
import com.sls.web.manager.page.Pagination;
import com.sls.web.manager.recharge.pojo.SupplierRechargeModeLog;
import com.sls.web.manager.recharge.querybean.SupplierRechargeModeLogQuery;
import com.sls.web.manager.recharge.service.SupplierRechargeModeLogService;

public class SupplierRechargeModeLogAction extends SuperAction {

	private static final long serialVersionUID = -3272605210697732124L;
	@Resource(name = "supplierRechargeModeLogService")
	private SupplierRechargeModeLogService supplierRechargeModeLogService;
	/**
	 * 返回分页对象
	 */
	public Pagination<?> page;
	private SupplierRechargeModeLogQuery supplierRechargeModeLogQuery;
	private SupplierRechargeModeLog supplierRechargeModeLog;
	private String id;

	public Pagination<?> getPage() {
		return page;
	}

	public void setPage(Pagination<?> page) {
		this.page = page;
	}

	public SupplierRechargeModeLogQuery getSupplierRechargeModeLogQuery() {
		return supplierRechargeModeLogQuery;
	}

	public void setSupplierRechargeModeLogQuery(
			SupplierRechargeModeLogQuery supplierRechargeModeLogQuery) {
		this.supplierRechargeModeLogQuery = supplierRechargeModeLogQuery;
	}

	public SupplierRechargeModeLog getSupplierRechargeModeLog() {
		return supplierRechargeModeLog;
	}

	public void setSupplierRechargeModeLog(
			SupplierRechargeModeLog supplierRechargeModeLog) {
		this.supplierRechargeModeLog = supplierRechargeModeLog;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	// 列表
	public String list() {
		if (supplierRechargeModeLogQuery == null) {
			supplierRechargeModeLogQuery = new SupplierRechargeModeLogQuery();
			supplierRechargeModeLogQuery.setPageSize(Constants.INIT_PAGESIZE);
			supplierRechargeModeLogQuery
					.setCurrentPage(Constants.INIT_CURRENTPAGE);
		}
		try {
			supplierRechargeModeLogQuery.setSupplierRechargeModeId(id);
			page = supplierRechargeModeLogService.queryLog(
					supplierRechargeModeLogQuery, getCurrentOperator());
		} catch (Exception e) {
			return ERROR;
		}

		return "list";
	}
}